<#assign contextPath = springMacroRequestContext.getContextPath()/>
<#import "/public/frame/main.html" as frame/>
<@frame.head "南航明珠商城-商品列表"></@frame.head>
<script type="text/javascript" src="${contextPath}/resources/js/tool/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/select/jquery.searchableSelect.css"/>
<script type="text/javascript">
	var path = "${contextPath}";
</script>
<style>
	/*********** TAB菜单 ***********/
	.admin_tab {border-bottom: 1px solid #ddd; height:40px; margin-top: 0px}
	.admin_tab a {float: left; padding: 8px 15px; background: #fbfbfb; border: solid #ddd; border-width: 1px 1px 0; margin-left: -1px; height: 22px;}
	.admin_tab .admin_tab_firstli a {margin-left: 0}
	.admin_tab .current,.admin_tab a:hover {height: 22px; border-bottom: 1px solid #fbfbfb;  margin-bottom: -1px; position: relative;}
	.admin_tab li {float: left;}
	.admin_tab_content {border: 1px solid #ddd; border-top-width: 0; padding: 10px;}
	/********** 缩略图DIV **********/
	.div_show {width: 200px; height: 200px; display: inline-block; position: relative;}
	.div_show img {width: 200px; height: 200px; border: 1px solid #CCCCCC;}
	.div_show .delete {position: absolute; top: 0px; right: 0px; width: 40px; height: 40px; font-size: 36px; display: none; color: red;}
	/*********** 表格TD **********/
	.edit_table td:nth-child(1) {width: 11%;}
	.edit_table td {width: 22%;}
</style>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i>后台管理中心<span class="c-gray en">&gt;</span>商品管理<span class="c-gray en">&gt;</span><#if isupdate?? && isupdate>编辑商品<#else>发布商品信息</#if><a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container" style="padding: 5px;">
  <form action="${contextPath}/product/<#if isupdate?? && isupdate>update_product<#else>save_product</#if>" method="post" onsubmit="return checkForm(0) && checkForm(1) && checkForm(2) && checkForm(3);" enctype="multipart/form-data" target="hidden_frame">
    <input type="hidden" id="typeId" value="${product.typeId}" name="type_Id"/>			
    <input type="hidden" id="prodId" value="${prodId?c}" name="prodId"/>
    <input type="hidden" value="1" name="payType"/>
    <ul class="admin_tab">
      <li><a href="javascript:void(0)" onclick="next(0)" id="admin_tab_one" class="current">商品信息</a></li>
      <li><a href="javascript:void(0)" onclick="next(1)" id="admin_tab_two">详细图片</a></li>
      <li><a href="javascript:void(0)" onclick="next(2)" id="admin_tab_three">商品详情</a></li>
	  <li><a href="javascript:void(0)" onclick="next(3)" id="admin_tab_four">规格参数</a></li>
    </ul>
    <div class="admin_tab_content">
      <!-- tab1 start -->
      <div>
        <table class="table edit_table">
          <#if isupdate?? && isupdate>
            <tr>
              <td>商品编号：</td>
              <td colspan="3">
                <input type="text" class="input-text radius" value="${product.id}" disabled="disabled"/>
              </td>
              <td></td>
            </tr>
          </#if>
          <tr>
            <td>商品名称：</td>
            <td colspan="3">
              <input type="text" class="input-text radius" id="productName" name="name" onblur="isProduct()" maxlength="50" value="${product.baseInfo.name}"/>
            </td>
            <td>
              <font color="red">*&nbsp;</font><span id="productNameTip" style="color:red;">&nbsp;</span>
            </td>
          </tr>
          <tr>
            <td>商品类型：</td>
            <td colspan="4">
              <div class="radio-box" style="padding-left: 23px; padding-right: 10px;">
			    <input type="radio" value="1" name="proType" id="real" <#if product.proType??><#else>checked="checked"</#if><#if 1==product.proType> checked="checked" <#else><#if isupdate?? && isupdate> disabled="disabled"</#if></#if>/>
			    <div style="padding-top: 3px;"><label for="real" style="cursor: pointer;">实物商品</label></div>
			  </div>
			  <div class="radio-box" style="padding-left: 23px; padding-right: 10px;">
			    <input type="radio" value="2" name="proType" id="notReal" <#if 2==product.proType> checked="checked" <#else><#if isupdate?? && isupdate> disabled="disabled"</#if></#if>/>
			    <div style="padding-top: 3px;"><label for="notReal" style="cursor: pointer;">虚拟商品</label></div>
			  </div>
			  <div class="radio-box" style="padding-left: 23px; padding-right: 10px;">
			    <input type="radio" value="3" name="proType" id="ticketCoupon" <#if 3==product.proType> checked="checked" <#else><#if isupdate?? && isupdate> disabled="disabled"</#if></#if>/>
			    <div style="padding-top: 3px;"><label for="ticketCoupon" style="cursor: pointer;">机票优惠券</label></div>
			  </div>
			  <div class="radio-box" style="padding-left: 23px; padding-right: 10px;">
			    <input type="radio" value="4" name="proType" id="other" <#if 4==product.proType> checked="checked" <#else><#if isupdate?? && isupdate> disabled="disabled"</#if></#if>/>
			    <div style="padding-top: 3px;"><label for="other" style="cursor: pointer;">其他</label></div>
			  </div>
			  <div class="radio-box" style="padding-left: 23px; padding-right: 10px;">
			    <input type="radio" value="5" name="proType" id="welfare" <#if 5==product.proType> checked="checked" <#else><#if isupdate?? && isupdate> disabled="disabled"</#if></#if>/>
			    <div style="padding-top: 3px;"><label for="welfare" style="cursor: pointer;">公益产品</label></div>
			  </div>
			</td>
          </tr>
		  <tr class="otherField" <#if 4!=product.proType>style="display: none;"</#if>>
		    <td>商品子类:</td>
			<td colspan="4">
			  <div class="radio-box" style="padding-left: 23px; padding-right: 10px;">
			    <input type="radio" value="1" name="otherType" id="planeTicket" <#if 4!=product.proType>checked="checked"<#elseif 4==product.proType && 1==product.otherType>checked="checked"</#if>/>
			    <div style="padding-top: 3px;"><label for="planeTicket" style="cursor: pointer;">机票资质</label></div>
			  </div>
			  <div class="radio-box" style="padding-left: 23px; padding-right: 10px;">
			    <input type="radio" value="2" name="otherType" id="cabinLift" <#if 4==product.proType && 2==product.otherType>checked="checked"</#if>/>
			    <div style="padding-top: 3px;"><label for="cabinLift" style="cursor: pointer;">升舱资质</label></div>
			  </div>
			</td>
		  </tr>
		  <tr class="welfareField" style="height: 50px;<#if 5!=product.proType>display: none;</#if>">
		    <td>开始时间：</td>
			<td colspan="4">
			  <div class="radio-box" style="padding-left: 23px; padding-right: 51px;">
			    <input type="radio" value="1" name="startTimeFlag" id="startTimeFlag1" <#if !product.startTime??>checked="checked"</#if>/>
			    <div style="padding-top: 3px;"><label for="startTimeFlag1" style="cursor: pointer;">无</label></div>
			  </div>
			  <div class="radio-box" style="padding-left: 23px; padding-right: 5px;">
			    <input type="radio" value="2" name="startTimeFlag" id="startTimeFlag2" <#if product.startTime??>checked="checked"</#if>/>
			    <div style="padding-top: 3px;"><label for="startTimeFlag2" style="cursor: pointer;">待开始</label></div>
			  </div>
			  <font color="red">*</font>
			  <div id="startTimeDiv" style="position: relative;padding-left: 20px;padding-top:3px;<#if product.startTime??>display: inline-block;<#else>display: none;</#if>">
			    <label>开始时间&nbsp;</label>
			    <input id="startTime" name="startTime" class="input-text radius Wdate" value='${(product.startTime?string("yyyy-MM-dd HH:mm:ss"))!}' onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime\')}',readOnly: true})" style="width: 180px;"/>
			    <font color="red">*</font>
			  </div>
			</td>
		  </tr>
		  <tr class="welfareField" style="height: 50px;<#if 5!=product.proType>display: none;</#if>">
		    <td>结束时间：</td>
			<td colspan="4">
			  <div class="radio-box" style="padding-left: 23px; padding-right: 51px;">
			    <input type="radio" value="1" name="endTimeFlag" id="endTimeFlag1" <#if !product.endTime??>checked="checked"</#if>/>
			    <div style="padding-top: 3px;"><label for="endTimeFlag1" style="cursor: pointer;">无</label></div>
			  </div>
			  <div class="radio-box" style="padding-left: 23px; padding-right: 5px;">
			    <input type="radio" value="2" name="endTimeFlag" id="endTimeFlag2" <#if product.endTime??>checked="checked"</#if>/>
			    <div style="padding-top: 3px;"><label for="endTimeFlag2" style="cursor: pointer;">待结束</label></div>
			  </div>
			  <font color="red">*</font>
			  <div id="endTimeDiv" style="position: relative;padding-left: 20px;padding-top:3px;<#if product.endTime??>display: inline-block;<#else>display: none;</#if>">
			    <label>结束时间&nbsp;</label>
			    <input id="endTime" name="endTime" class="input-text radius Wdate" value='${(product.endTime?string("yyyy-MM-dd HH:mm:ss"))!}' onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startTime\')}',readOnly: true})" style="width: 180px;"/>
			    <font color="red">*</font>
			  </div>
			</td>
		  </tr>
          <tr class="realField notRealField ticketCouponField otherField" <#if 5==product.proType>style="display: none;"</#if>>
            <td>商品类别：</td>
            <td>
              <span id="prodTypeSpan1" class="select-box radius"> 
                <select id="firstProdType" name="typeId" class="select" onchange="showChildProdType(this, 2)">
                  <option value="-1">请选择分类</option>
                  <#list prodTypeList as prodType>
      			    <option value="${prodType.id}" <#if prodType.id==productProperty.prodTypeOne.id>selected</#if>>${prodType.name}</option>     
			      </#list>
				</select>
              </span>
            </td>
            <td>
              <font style="float:left;" color="red">*</font>
              <div style="width:95%;float:right;">
                <span id="prodTypeSpan2">
                  <#if prodTypeListTwo?? && prodTypeListTwo?size &gt; 0>
                    <span class="select-box radius">
                      <select name="typeId"  class="select" onchange="showChildProdType(this, 3)">
                        <option value="-1">请选择分类</option>
                        <#list prodTypeListTwo as prodType> 
                          <option value="${prodType.id?c}" <#if prodType.id==productProperty.prodTypeTwo.id>selected</#if> >${prodType.name}</option>
                        </#list>
                      </select>  
                    </span> 
                  </#if>
                </span>
              </div>
            </td>
            <td>
              <span id="prodTypeSpan3">
                <#if prodTypeListThree?? && prodTypeListThree?size &gt; 0>
                  <span class="select-box radius">
                    <select name="typeId" class="select" onchange="showChildProdType(this, 4)">
                      <option value="-1">请选择分类</option>
                      <#list prodTypeListThree as prodType> 
                  	    <option value="${prodType.id?c}" <#if prodType.id==productProperty.prodTypeThree.id>selected</#if> >${prodType.name}</option>
                      </#list>
                    </select>  
                  </span>
                </#if>
              </span>
            </td>
            <td>
              <span id="prodTypeSpan4"></span>
              <span id="prodTypeSpan5"></span>
            </td>
          </tr>
          <tr class="realField notRealField ticketCouponField otherField" <#if 5==product.proType>style="display: none;"</#if>>
            <td>商品品牌：</td>
            <td>
              <span id="brandSpan">
                <select id="brand" name="brandId">
                  <option value="0">请选择品牌</option> 
                  <#if brandList?? && brandList?size &gt; 0>
                    <#list brandList as brand> 
                      <option value="${brand.id?c}" <#if brand.id==product.brandId>selected</#if>>${brand.name}</option>
                    </#list>
                  </#if>
                </select>
              </span>
            </td>
            <td><font color="red">*</font></td>
            <td colspan="2"></td>
          </tr>
          <tr>
            <td>商品库存：</td>
            <td>
              <input type="text" class="input-text radius <#if (2==product.proType || 3==product.proType)&&(isupdate?? && isupdate)>disabled</#if>" id="storeNum" name="storeNum" value="${(stockNum?c)!}" maxlength="20" <#if (2==product.proType || 3==product.proType)&&(isupdate?? && isupdate)>readonly="readonly"</#if>/>
            </td>
            <td><font color="red">*</font></td>
            <td colspan="2"></td>
          </tr>
          <tr class="realField notRealField ticketCouponField otherField" <#if 5==product.proType>style="display: none;"</#if>>
            <td>警戒库存：</td>
            <td><input type="text" class="input-text radius" id="warnStoreNum" name="warnStoreNum" value="${(product.storeInfo.warnStoreNum?c)!'0'}" maxlength="20"/></td>
            <td><font color="red">*</font></td>
            <td colspan="2"></td>
          </tr>
          <tr class="realField notRealField ticketCouponField otherField" <#if 5==product.proType>style="display: none;"</#if>>
            <td>商品重量：</td>
            <td><input type="text" class="input-text radius" id="weight" name="weight" maxlength="20" value="<#if product.baseInfo.weight??>${product.baseInfo.weight?string.number}</#if>"/></td>
            <td>kg<font color="red">*</font></td>
            <td colspan="2"></td>
          </tr>
          <tr>
            <td>所属供应商：</td>
            <td>
              <span class="select-box radius">
       	        <select class="select" id="mercId" name="merchantId">
                  <option value="0" >请选择供应商</option> 
                  <#list merchantList as merchant> 
                    <option value="${merchant.id?c}" <#if merchant.id==product.merchant.id>selected</#if>>${merchant.mercName}</option>
                  </#list>
                </select>
              </span>
            </td>
            <td><font color="red">*</font></td>
            <td colspan="2"></td>
          </tr>
          <tr class="realField notRealField ticketCouponField otherField" <#if 5==product.proType>style="display: none;"</#if>>
            <td>商品关键字：</td>
            <td><input class="input-text radius" type="text" name="keywords" value="${keywords[0]}" maxlength="30"/></td>
            <td><input class="input-text radius" type="text" name="keywords" value="${keywords[1]}" maxlength="30"/></td>
            <td><input class="input-text radius" type="text" name="keywords" value="${keywords[2]}" maxlength="30"/></td>
            <td><input class="input-text radius" type="text" name="keywords" value="${keywords[3]}" maxlength="30"/></td>
          </tr>
          <tr class="realField notRealField ticketCouponField otherField" <#if 5==product.proType>style="display: none;"</#if>>
            <td>商品原价：</td>
            <td><input type="text" class="input-text radius" id="payCostMileage" name="payCostMileage" value="${(product.priceInfo.payCostMileage?c)!}" maxlength="20"/></td>  
            <td>公里</td>
            <td colspan="2"></td>
          </tr>
          <tr>
            <td>商品价格：</td>
            <td><input type="text" class="input-text radius" id="payOneMileage" name="payOneMileage" value="${(product.priceInfo.payOneMileage?c)!}" maxlength="20"/></td> 
            <td>公里 <font color="red">*</font></td>
            <td colspan="2"></td>
          </tr>
          <tr>
            <td id="cardTextTd"><#if 5==product.proType>会员捐赠级别：<#else>商品购买级别：</#if></td>
            <td>
              <span class="select-box radius">
                <select class="select" id="card" name="card">
                  <option value="0">请选择会员等级</option>
                  <option <#if product.baseInfo.card==1> selected="selected"</#if> value="1">普通卡会员及以上</option>
                  <option <#if product.baseInfo.card==2> selected="selected"</#if> value="2">银卡会员及以上</option>
                  <option <#if product.baseInfo.card==3> selected="selected"</#if> value="3">金卡会员及以上</option>
                  <option <#if product.baseInfo.card==7> selected="selected"</#if> value="7">白金卡会员及以上</option>
                </select>
              </span>
            </td>
            <td><font color="red">*</font></td>
            <td colspan="2"></td>
          </tr>  
	      <tr class="notRealField ticketCouponField" <#if 2!=product.proType && 3!=product.proType>style="display:none;"</#if>>
		    <td>是否有移动端：</td>
			<td>
			  <div class="check-box" style="width: 8%;padding-left: 0px; padding-right: 0px;">
			    <input type="checkbox" id="merchantUrl_checkbox" name="merchantUrl_checkbox" <#if product != null && product.merchantUrl != null>checked="checked"</#if>/>
			    <label>&nbsp;</label>
			  </div>
			  <div style="width: 90%;display: inline-block;position: relative;">
			    <input type="text" class="input-text radius" id="merchantUrl" name="merchantUrl" value="${product.merchantUrl}" maxlength="1024" placeholder="请输入商品链接" <#if product == null || product.merchantUrl == null>disabled="disabled"</#if>/>
			  </div>
            </td>
            <td colspan="3" id="merchantUrlStarTd" style=<#if product == null || product.merchantUrl == null>"display: none;</#if>"><font color="red">*</font></td>
	      </tr>
        </table>
        <input type="button" class="btn btn-primary radius" style="margin-left: 5px;" onclick="next(1);" name="下一步" value="下一步"/> 
      </div>
	  <!-- tab1 end -->
	  <!-- tab2 start -->
	  <div>
        <table class="tab_iframe">
          <tr>
            <td style="text-align: center; vertical-align: middle;">
              <div id="show_0" class="div_show">
                <img src="${contextPath}/resources/images/no_img.jpg"/>
                <a href="javascript:void();"><div class="delete icon Hui-iconfont Hui-iconfont-del3" data-id="0" title="删除图片"></div></a>
              </div> 
            </td>
            <td style="text-align: center; vertical-align: middle;">
              <div id="show_1" class="div_show">
                <img src="${contextPath}/resources/images/no_img.jpg"/>
                <a href="javascript:void();"><div class="delete icon Hui-iconfont Hui-iconfont-del3" data-id="1" title="删除图片"></div></a>
              </div> 
            </td>
            <td style="text-align: center; vertical-align: middle;"> 
              <div id="show_2" class="div_show">
                <img src="${contextPath}/resources/images/no_img.jpg"/>
                <a href="javascript:void();"><div class="delete icon Hui-iconfont Hui-iconfont-del3" data-id="2" title="删除图片"></div></a>	
              </div> 
            </td>
          </tr>
          <tr>
            <td style="text-align: center; vertical-align: middle; padding: 5px;">
			  <span class="btn-upload">
			    <a href="javascript:void();" class="btn btn-secondary radius size-S"><i class="Hui-iconfont">&#xe642;</i>上传图片</a>
			    <input type="file" accept="image/*" id="addImage0" name="imageFile" class="input-file" data-id="show_0"/>
			  </span>
            </td>
    		<td style="text-align: center; vertical-align: middle;">
    		  <span class="btn-upload">
			    <a href="javascript:void();" class="btn btn-secondary radius size-S"><i class="Hui-iconfont">&#xe642;</i>上传图片</a>
			    <input type="file" accept="image/*" id="addImage1" name="imageFile" class="input-file" data-id="show_1"/>
			  </span>
    		</td>
            <td style="text-align: center; vertical-align: middle;">
              <span class="btn-upload">
			    <a href="javascript:void();" class="btn btn-secondary radius size-S"><i class="Hui-iconfont">&#xe642;</i>上传图片</a>
			    <input type="file" accept="image/*" id="addImage2" name="imageFile" class="input-file" data-id="show_2"/>
			  </span>
            </td>
          </tr>
          <tr>
            <td style="text-align: center; vertical-align: middle;">
              <div id="show_3" class="div_show">
                <img src="${contextPath}/resources/images/no_img.jpg"/>
                <a href="javascript:void();"><div class="delete icon Hui-iconfont Hui-iconfont-del3" data-id="3" title="删除图片"></div></a>   
              </div> 
            </td>
            <td style="text-align: center; vertical-align: middle;">
              <div id="show_4" class="div_show">
                <img src="${contextPath}/resources/images/no_img.jpg"/>
                <a href="javascript:void();"><div class="delete icon Hui-iconfont Hui-iconfont-del3" data-id="4" title="删除图片"></div></a>              
              </div> 
            </td>
          </tr>
          <tr>
            <td style="text-align: center; vertical-align: middle; padding: 5px;">
              <span class="btn-upload">
			    <a href="javascript:void();" class="btn btn-secondary radius size-S"><i class="Hui-iconfont">&#xe642;</i>上传图片</a>
			    <input type="file" accept="image/*" id="addImage3" name="imageFile" class="input-file" data-id="show_3"/>
			  </span>
            </td>   	  
            <td style="text-align: center; vertical-align: middle;">
              <span class="btn-upload">
			    <a href="javascript:void();" class="btn btn-secondary radius size-S"><i class="Hui-iconfont">&#xe642;</i>上传图片</a>
			    <input type="file" accept="image/*" id="addImage4" name="imageFile" class="input-file" data-id="show_4"/>
			  </span>
            </td>
          </tr>
        </table>
		<input type="button" class="btn btn-primary radius" style="margin-left: 5px;" onclick="next(0)" name="上一步" value="上一步"/>&nbsp;&nbsp;<input class="btn btn-primary radius" type="button" onclick="next(2)" name="下一步" value="下一步"/> 			
      </div>
	  <!-- tab2 end -->		
	  <!-- tab3 start -->		
      <div>
     	<textarea id="content" name="proDetail">${product.baseInfo.proDetail}</textarea> 
		<input type="button" class="btn btn-primary radius" style="margin-left: 5px;margin-top: 5px;" onclick="next(1)" name="上一步" value="上一步"/>&nbsp;&nbsp;<input class="btn btn-primary radius" type="button" onclick="next(3)" name="下一步" value="下一步"/> 		
      </div>
	  <!-- tab3 end -->
      <!-- tab4 start -->	
	  <div>
        <div class="right_input"></div>
        <input type="button" class="btn btn-primary radius" style="margin-left: 5px;" onclick="next(2)" name="上一步" value="上一步"/>&nbsp;&nbsp;<input class="btn btn-success radius" type="submit" value="提交" onclick="parent.layer.load(1);"/>
      </div>
      <!-- tab4 start -->		
    </div>
  </form>	
  <iframe name="hidden_frame" style="display:none; height: 0px; width: 0px;" frameborder="0" ></iframe>
</div>
<@frame.end "default"></@frame.end>
<script type="text/javascript" src="${contextPath}/resources/js/select/jquery.searchableSelect.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/product/add_or_update_product.js"></script>
<script type="text/javascript" >
var prodId = "${prodId}";
<#if isupdate?? && isupdate>
	var isupdate = true;
<#else>
	var isupdate = false;
</#if>
$(document).ready(function() {
	<#if imageList?? && imageList?size &gt; 0>
	    <#list imageList as image>
		    <#if image??>
				var img = $("#show_${image.sequences}").children("img");
				img.attr("src", "${imagePath}/shop/product/${image.prodId}/${image.image}");
				img.attr("data-type", "1");
		     <#else>
				img.attr("src", "${contextPath}/resources/images/no_img.jpg");
				img.attr("data-type", "0");
		    </#if>
	    </#list>
	</#if>
});

/**
 * 修改之后的回调方法
 */
function updateCallback(flag, message) {
	layer.closeAll("loading");
	if (flag == true) {
		layer.msg("操作成功！", {
			icon : 1,
			time : 1000
		}, function() {
			var index = parent.layer.getFrameIndex(window.name);
			parent.search(true);
			parent.layer.close(index);
		});
	} else {
		layer.alert(message);
	}
}

/**
 * 新增之后的回调方法
 */
function saveCallback(flag, message) {
	if (flag == true) {
		switchToProduListTab();
	} else {
		layer.alert(message);
	}
}

/**
 * 切换到“商品列表”菜单
 */
function switchToProduListTab() {
	// 若“商品列表”菜单已打开，则关闭此菜单
	var topWindow = $(window.parent.document);
	var menuTabLi = topWindow.find("#min_title_list li"); // 已打开的菜单TAB页
	var href = path + "/product/query_product";
	var divContainer = topWindow.find("#iframe_box .show_iframe");
	menuTabLi.each(function() {
		if($(this).find("span").attr("data-href") == href) {
			$(this).remove();
			divContainer.eq(menuTabLi.index($(this))).remove();
			return false;
		}
	});
	
	// 将本页面指向“商品列表”菜单
	window.location.href = href;
	var showTabLi = topWindow.find("#min_title_list li.active");
	showTabLi.find("span").attr("data-href", href).text("商品列表");
	parent.layer.closeAll("loading");
}
</script>